<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <?php include('public/head.php');?>
</head>
<body>
<?php include('public/header.php');?>
<div class="container">
    <?php include('public/process.php');?>
    <div class="panel panel-default">
        <div class="panel-body">
            <table class="table">
                <caption><h4><?php echo lang('working_environment');?></h4></caption>
                <thead>
                <tr>
                    <th width="30%"><?php echo lang('item');?></th>
                    <th width="30%"><?php echo lang('require');?></th>
                    <th><?php echo lang('result');?></th>
                </tr>
                </thead>
                <tbody>
                <?php foreach($env_vars as $item):?>
                    <tr >
                        <td><?php echo $item[0];?></td>
                        <td><?php echo $item[1]; ?></td>
                        <td><span class="label label-<?php echo $item[4];?>"><?php echo $item[3];?></span></td>
                    </tr>
                <?php endforeach;?>
                </tbody>
            </table>
            <table class="table">
                <caption><h4><?php echo lang('dir_file_privilege');?></h4></caption>
                <thead>
                <tr>
                    <th width="30%"><?php echo lang('dir');?>/<?php echo lang('file');?></th>
                    <th width="30%"><?php echo lang('require');?></th>
                    <th><?php echo lang('result');?></th>
                </tr>
                </thead>
                <tbody>
                <?php foreach($dirs as $item):?>
                    <tr>
                        <td><?php echo $item[3]; ?></td>
                        <td><?php echo lang('writable');?></td>
                        <td><span class="label label-<?php echo $item[2];?>"><?php echo $item[1]?></span></td>
                    </tr>
                <?php endforeach;?>
                </tbody>
            </table>
            <table class="table">
                <caption><h4><?php echo lang('dependency_functions');?></h4></caption>
                <thead>
                <tr>
                    <th width="30%"><?php echo lang('function_name');?></th>
                    <th><?php echo lang('result');?></th>
                </tr>
                </thead>
                <tbody>
                <?php foreach($functions as $item):?>
                    <tr>
                        <td><?php echo $item[0];?>()</td>
                        <td><span class="label label-<?php echo $item[2];?>"><?php echo $item[1];?></span></td>
                    </tr>
                <?php endforeach;?>
                </tbody>
            </table>
        </div>
    </div>
</div>
<nav>
    <ul class="pager">
        <?php if (isset($_SESSION['error']) && $_SESSION['error'] === TRUE) :?>
        <li><a href="<?php echo site_url('setup')?>"><?php echo lang('previous');?></a></li>
        <li><a href="<?php echo site_url('setup/environment');?>"><?php echo lang('re_check');?></a></li>
        <?php else : ?>
        <li><a href="<?php echo site_url('setup')?>"><?php echo lang('previous');?></a></li>
        <li><a href="<?php echo site_url('setup/setting')?>"><?php echo lang('next');?></a></li>
        <?php endif;?>
    </ul>
</nav>
<!-- /.container -->

<?php include('public/footer.php');?>
</body>
</html>